package yunjiao.javatutorials.designpatterns.interpreter;

import lombok.AllArgsConstructor;
import lombok.Data;

/**
 * 雇员
 *
 * @author yangyunjiao
 */
@Data
@AllArgsConstructor
public abstract class Employee {
    protected long employeeId;
    protected String employeeName;
    protected String designation;
    protected Department department;
    protected int salary;


    public abstract int teamSize();

    public abstract String teamNames();

    public abstract boolean isManager();


    public String fullDetails() {
        StringBuilder builder = new StringBuilder();
        builder.append("Employee [").append(employeeId).append(", ").append(employeeName).append(", ")
                .append(designation).append(", ").append(department).append(", ").append(salary).append(", TeamSize=")
                .append(teamSize()).append(", Team=").append(teamNames()).append("]");
        return builder.toString();

    }

    public String shortDetails() {
        StringBuilder builder = new StringBuilder();
        builder.append("'").append(employeeName).append("'");
        return builder.toString();

    }
}
